window.onload = function () {
    // 要操作到的元素
    const login = document.getElementById('login');
    const register = document.getElementById('register');
    const form_box = document.getElementsByClassName('form_box')[0];
    const register_box = document.getElementsByClassName('register_box')[0];
    const login_box = document.getElementsByClassName('login_box')[0];
    // 去注册按钮点击事件
    register.addEventListener('click', () => {
        form_box.style.transform = 'translateX(90%)';
        login_box.classList.add('hidden');
        register_box.classList.remove('hidden');
    })
    // 去登录按钮点击事件
    login.addEventListener('click', () => {
        form_box.style.transform = 'translateX(0%)';
        register_box.classList.add('hidden');
        login_box.classList.remove('hidden');
    })
}






